package com.jinrustar.shenjiying.util

import android.content.Context
import android.widget.Toast

/**
 * Created by wei on 17-12-27.
 */
object ToastUtil {
    private var toast: Toast? = null

    fun showToast(msg: CharSequence, ctx: Context) {

        if (toast == null) {
            toast = Toast.makeText(ctx, msg, Toast.LENGTH_SHORT)
        }
        toast?.setText(msg)
        toast?.show()
    }
}